﻿
var app = angular.module('app',['ngRoute','controllers','api', 'ngDragDrop']);
app.config(function ($httpProvider) {
    // Use x-www-form-urlencoded Content-Type
    $httpProvider.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=utf-8';

    $httpProvider.defaults.transformRequest = [function (data) {
        return angular.isObject(data) && String(data) !== '[object File]' ? $.param(data) : data;
    }];
});
app.run(function($rootScope) {


});

app.config(function($routeProvider) {
    $routeProvider.when('/index', {
        templateUrl: './tmpl/index.html',
        controller: 'IndexController'
    }).when('/save', {
        templateUrl: './tmpl/save.html',
        controller: 'SaveController'
    }).otherwise({
		redirectTo: '/index'
	});
});